//
//  HealthFoodListTableViewCell.m
//  LoveHealth
//
//  Created by 枫哥 on 14-9-22.
//  Copyright (c) 2014年 lanou. All rights reserved.
//

#import "HealthFoodListTableViewCell.h"
#import "HealthFoodList.h"


@implementation HealthFoodListTableViewCell

- (void)dealloc
{
    [_nameLabel release];
    [_leftImage release];
    self.foodList = nil;
    self.behavierTagLabel = nil;
    self.tagLabel = nil;
    self.iconView = nil;
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self setupSubviews];
    }
    return self;
}

- (void)setupSubviews
{
    
    
    _leftImage = [[UIImageView alloc]initWithFrame:CGRectMake(5, 5, 90, 90)];
    _leftImage.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:_leftImage];
    
    _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(120, 20, 200, 30)];
    _nameLabel.text = @"健康食谱";
    [self.contentView addSubview:_nameLabel];
//    _tagLabel = [[UILabel alloc]initWithFrame:CGRectMake(120, 60, 35, 20)];
//    _tagLabel.text = @"标签：";
//    _tagLabel.font = [UIFont systemFontOfSize:10.0];
//    [self.contentView addSubview:_tagLabel];
    _iconView = [[UIImageView alloc] initWithFrame:CGRectMake(120, 60, 16, 16)];
    _iconView.image = [UIImage imageNamed:@"biaoqian.png"];
    [self.contentView addSubview:_iconView];
    
    
    _behavierTagLabel = [[UILabel alloc]initWithFrame:CGRectMake(140, 58, 320-155,20)];
    _behavierTagLabel.text = @"gggg";
    _behavierTagLabel.font = [UIFont systemFontOfSize:11.0];
    [self.contentView addSubview:_behavierTagLabel];
    
    
    
    
}

//- (void)setFoodList:(HealthFoodList *)foodList
//{
//    if (_foodList != foodList) {
//        [_foodList release];
//        _foodList = [foodList retain];
//    }
//    NSString * str = APIImageURL(foodList.img);
//    
//    NSURL * url = [NSURL URLWithString:str];
//    
//   
//}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
